﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcProject.Models.WorkType>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>工种列表</h2>

    <table>
        <tr>
            <th>
                工种名称
            </th>
            <th>
                工种排序号
            </th>
            <th>
                创建人
            </th>
            <th>
                创建时间
            </th>
            <th></th>
        </tr>

    <% if (Model != null) foreach (var item in Model)
           { %>
    
        <tr>
            <td>
                <%: item.WorkTypeName %>
            </td>
            <td>
                <%: item.WorkTypeOrder %>
            </td>
            <td>
                <%: item.CreateUserName %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreateDate) %>
            </td>
            <td>
                <%: Html.ActionLink("编辑", "Edit", new { id=item.WorkTypeId }) %> |
                <%: Html.ActionLink("详细信息", "Details", new { id=item.WorkTypeId })%> |
                <%: Html.ActionLink("删除", "Delete", new { id=item.WorkTypeId })%>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("创建新工种", "Create") %>
    </p>

</asp:Content>

